What Are Webhooks?

Webhooks are a way for a Tilte system to provide real-time information to the users. They allow one system to send automated messages or data to another system when a specific event occurs. A webhook is a lightweight API that allows for immediate notifications and interactions between systems.

In this webhook guide, we will explore the following:

What is a Webhook?

A webhook is an HTTP-based callback function that enables lightweight, event-driven communication between two application programming interfaces (APIs). When a specified event occurs in the Tilte application, a webhook sends a notification to a designated URL in another application or a subscriber/user, delivering data in the form of a payload, typically formatted as JSON or XML. This mechanism allows applications to react to events in real-time, making webhooks a valuable alternative to traditional APIs, which often require polling for updates.

Uses of Webhooks

Webhooks are utilized in various scenarios, including:

  • Notifications: Send alerts to collaboration platforms (e.g., Tilte) when specific events happen, like sending messages or receiving messages.

  • Data Synchronization: Updating external systems (e.g., Tilte) based on events in the primary application.

  • Real-time User Interactions: Notifying applications when users perform actions, such as checking into a message or creating a message.

How Webhooks Work?

  • Webhook Setup: The application that needs to send notifications (the sender) will have a webhook configured. This involves specifying a URL (the endpoint) where the data should be sent. The application that wants to receive notifications (the receiver) sets up an endpoint to listen for incoming webhook messages.

  • Event Occurs: When a predefined event happens in the sender application (e.g., a new user signs up, a payment is processed), the sender application triggers the webhook.

  • Send Data: The sender application sends an HTTP request (usually a POST request) to the receiver's endpoint URL. This request contains data about the event in the body of the request.

  • Receive and Process Data: The receiver application receives the request and processes the data. This might involve updating a database, triggering further actions, or sending a notification to a user.

  • Response (Optional): The receiver can respond to the sender with an acknowledgment or error message, confirming that the data was received and processed correctly.

The webhooks that are supported by the Tilte platform are detailed below. This data is used as post-back data for a triggered webhook.

Since webhook notifications are dispatched when certain event(s) happen, for some event types notifications are placed in batches. This applies to all notifications that could be sent in large numbers within a small amount of time.

Types of Events

Subscribe event

Subscribing to events via webhooks allows your application to receive real-time notifications whenever specific actions occur in our system. This enables you to automate workflows, synchronize data, and enhance user experiences without the need for constant polling.

<?xml version="1.0" encoding="utf-16"?>
<SubscribedNotification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <ListId>4dbce53b396949c88068ba652aa1c5a7</ListId>
    <ListName>WebhookTestList4</ListName>
    <Events>
        <SubscribedEvent>
            <Email>alwskd.myemail@mail.com</Email>
            <Date>2024-08-07T12:45:49.4657042Z</Date>
            <SubscriberId>alwskd.myemail@mail.com</SubscriberId>
        </SubscribedEvent>
        <SubscribedEvent>
            <Email>kjhvkf.myemail@mail.com</Email>
            <Date>2024-08-07T12:46:04.5128443Z</Date>
            <SubscriberId>kjhvkf.myemail@mail.com</SubscriberId>
        </SubscribedEvent>
        <SubscribedEvent>
            <Email>ksdjh.myemail@mail.com</Email>
            <Date>2024-08-07T12:46:13.0929985Z</Date>
            <SubscriberId>ksdjh.myemail@mail.com</SubscriberId>
        </SubscribedEvent>
    </Events>
    <Random>qtrzaDYWxEWIN9h7hsfodAvZEL27wmVGh7Vc0BFhWUY=</Random>
    <NotificationType>Subscribe</NotificationType>
</SubscribedNotification>

{
    "ListId": "4dbce53b396949c88068ba652aa1c5a7",
    "ListName": "WebhookTestList4",
    "Events": [
        {
            "Email": "alwskd.myemail@mail.com",
            "Date": "2024-08-07T12:45:49.4657042Z",
            "SubscriberId": "alwskd.myemail@mail.com"
        },
        {
            "Email": "kjhvkf.myemail@mail.com",
            "Date": "2024-08-07T12:46:04.5128443Z",
            "SubscriberId": "kjhvkf.myemail@mail.com"
        },
        {

            "Email": "ksdjh.myemail@mail.com",
            "Date": "2024-08-07T12:46:13.0929985Z",
            "SubscriberId": "ksdjh.myemail@mail.com"
        }
    ],
    "Random": "qtrzaDYWxEWIN9h7hsfodAvZEL27wmVGh7Vc0BFhWUY=",
    "NotificationType": "Subscribe"
}

Update subscriber event

UpdateSubscriber event is designed to notify systems and applications when a subscriber's information has been modified. This can include updates to personal details, preferences, subscription status, or any other relevant attributes. By capturing these updates in real-time, applications can maintain accurate records, trigger additional workflows, and ensure that subscribers receive the correct communications based on their current status.

Sample update subscriber event notification

<?xml version="1.0" encoding="utf-16"?>
<UpdatedSubscriberNotification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ListId>4dbce53b396949c88068ba652aa1c5a7</ListId>
  <ListName>WebhookTestList4</ListName>
  <Events>
    <UpdatedSubscriberEvent>
      <Email>kjhvkf.machetqecc@striata.com</Email>
      <Date>2024-08-07T13:23:59.4949224Z</Date>
      <SubscriberId>kjhvkf.machetqecc@striata.com</SubscriberId>
    </UpdatedSubscriberEvent>
  </Events>
  <Random>bZyUVcAvLUSESG46d2pJ6VytD3EoUjhLk8yIDgKO8kA=</Random>
  <NotificationType>UpdateSubscriber</NotificationType>
</UpdatedSubscriberNotification>

{
  "ListId": "4dbce53b396949c88068ba652aa1c5a7",
  "ListName": "WebhookTestList4",
  "Events": [
    {
      "Email": "kjhvkf.machetqecc@striata.com",
      "Date": "2024-08-07T13:23:59.4949224Z",
      "SubscriberId": "kjhvkf.machetqecc@striata.com"
    }
  ],
  "Random": "bZyUVcAvLUSESG46d2pJ6VytD3EoUjhLk8yIDgKO8kA=",
  "NotificationType": "UpdateSubscriber"
}

Unsubscribe event

The Unsubscribe event helps to notify systems and applications when a subscriber has chosen to withdraw their consent to receive communications.

<?xml version="1.0" encoding="utf-16"?>
<UnsubscribedNotification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ListId>4dbce53b396949c88068ba652aa1c5a7</ListId>
  <ListName>WebhookTestList4</ListName>
  <Events>
    <UnsubscribedEvent>
      <Email>kjhvkf.machetqecc@striata.com</Email>
      <Date>2024-08-07T13:27:46.4801198Z</Date>
      <SubscriberId>kjhvkf.machetqecc@striata.com</SubscriberId>
    </UnsubscribedEvent>
  </Events>
  <Random>SLe4SlSMQ06nrpeXWJcCMPDoa0eGxNtJuRclICGHHuM=</Random>
  <NotificationType>Unsubscribe</NotificationType>
</UnsubscribedNotification>

{
  "ListId": "4dbce53b396949c88068ba652aa1c5a7",
  "ListName": "WebhookTestList4",
  "Events": [
    {
      "Email": "kjhvkf.machetqecc@striata.com",
      "Date": "2024-08-07T13:27:46.4801198Z",
      "SubscriberId": "kjhvkf.machetqecc@striata.com"
    }
  ],
  "Random": "SLe4SlSMQ06nrpeXWJcCMPDoa0eGxNtJuRclICGHHuM=",
  "NotificationType": "Unsubscribe"
}

Address suppression event

Address suppression event helps to inform systems when a specific email address has been suppressed. This suppression typically occurs when a user has unsubscribed, marked emails as spam, or when the email address is identified as invalid (e.g., hard bounces). The primary goal is to prevent future communications to these addresses, ensuring compliance with regulations and maintaining a positive sender reputation.

<?xml version="1.0" encoding="utf-16"?>
<SuppressedNotification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Events>
    <SuppressedEvent>
      <Email>kjhvkf.machetqecc@striata.com</Email>
      <Date>2024-08-07T13:34:06.1412763Z</Date>
    </SuppressedEvent>
  </Events>
  <Random>lPAYcWlieEGwBV1HIVwDv5pP8T78PudEhG3TXRbCYNM=</Random>
  <NotificationType>AddressSuppress</NotificationType>
</SuppressedNotification>

{
  "Events": [
    {
      "Email": "kjhvkf.machetqecc@striata.com",
      "Date": "2024-08-07T13:34:06.1412763Z"
    }
  ],
  "Random": "lPAYcWlieEGwBV1HIVwDv5pP8T78PudEhG3TXRbCYNM=",
  "NotificationType": "AddressSuppress"
}

Message open event

Message open event helps to notify systems when a recipient opens an email or message. This event is essential for measuring engagement and effectiveness in email campaigns. By tracking opens, Tilte can assess the performance of their messages, understand recipient behavior, and refine their marketing strategies accordingly.

<?xml version="1.0" encoding="utf-16"?>
<MessageOpenNotification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CampaignId>aa4c33c978ed429c9cac265c4915d621</CampaignId>
  <CampaignName>TestCampaign11a</CampaignName>
  <Events>
    <MessageOpenEvent>
      <Email>tbpu4.pulp084@passmail.net</Email>
      <Date>2024-08-07T14:11:31.7571473Z</Date>
      <SubscriberId>tbpu4.pulp084@passmail.net</SubscriberId>
    </MessageOpenEvent>
    <MessageOpenEvent>
      <Email>tbpu5.displease379@passfwd.com</Email>
      <Date>2024-08-07T14:11:31.7594372Z</Date>
      <SubscriberId>tbpu5.displease379@passfwd.com</SubscriberId>
    </MessageOpenEvent>
  </Events>
  <Random>7jekcIcLjEG462hYeUwqLZDrP5/I5wdNpFE9clPmVS8=</Random>
  <NotificationType>MessageOpen</NotificationType>
</MessageOpenNotification>

{
  "CampaignId": "aa4c33c978ed429c9cac265c4915d621",
  "CampaignName": "TestCampaign11a",
  "Events": [
    {
      "Email": "tbpu4.pulp084@passmail.net",
      "Date": "2024-08-07T14:11:31.7571473Z",
      "SubscriberId": "tbpu4.pulp084@passmail.net"
    },
    {
      "Email": "tbpu5.displease379@passfwd.com",
      "Date": "2024-08-07T14:11:31.8392630Z",
      "SubscriberId": "tbpu5.displease379@passfwd.com"
    }
  ],
  "Random": "7jekcIcLjEG462hYeUwqLZDrP5/I5wdNpFE9clPmVS8=",
  "NotificationType": "MessageOpen"
}

Message click event

Message click event helps to notify systems when a recipient interacts with a message by clicking on it. This interaction can provide valuable insights into user behavior, allowing organizations to understand which messages or content types are most engaging. By tracking clicks, businesses can optimize their messaging strategies and improve overall user experience.

<?xml version="1.0" encoding="utf-16"?>
<MessageClickNotification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CampaignId>aa4c33c978ed429c9cac265c4915d621</CampaignId>
  <CampaignName>TestCampaign11a</CampaignName>
  <Events>
    <MessageClickEvent>
      <Email>tbpu4.pulp084@passmail.net</Email>
      <Date>2024-08-07T14:11:31.7571473Z</Date>
      <SubscriberId>tbpu4.pulp084@passmail.net</SubscriberId>
      <Url>https://www.google.com</Url>
    </MessageClickEvent>
    <MessageClickEvent>
      <Email>tbpu5.displease379@passfwd.com</Email>
      <Date>2024-08-07T14:11:31.7594372Z</Date>
      <SubscriberId>tbpu5.displease379@passfwd.com</SubscriberId>
      <Url>https://www.mail.com</Url>
    </MessageClickEvent>
  </Events>
  <Random>7jekcIcLjEG462hYeUwqLZDrP5/I5wdNpFE9clPmVS8=</Random>
  <NotificationType>MessageClick</NotificationType>
</MessageClickNotification>

{
  "CampaignId": "aa4c33c978ed429c9cac265c4915d621",
  "CampaignName": "TestCampaign11a",
  "Events": [
    {
      "Email": "tbpu4.pulp084@passmail.net",
      "Date": "2024-08-07T14:11:41.82374849Z",
      "SubscriberId": "tbpu4.pulp084@passmail.net",
      "Url": "https://www.google.com"
    },
    {
      "Email": "tbpu5.displease379@passfwd.com",
      "Date": "2024-08-07T14:11:38.2345678Z",
      "SubscriberId": "tbpu5.displease379@passfwd.com",
      "Url": "https://www.mail.com"
    }
  ],
  "Random": "7jekcIcLjEG462hYeUwqLZDrP5/I5wdNpFE9clPmVS8=",
  "NotificationType": "MessageClick"
}

Message delivered event

Message delivered event is a notification that indicates a message has been successfully delivered to a recipient's device. This event is important for tracking the effectiveness of messaging campaigns and ensuring that communications reach their intended audience.

<?xml version="1.0" encoding="utf-16"?>
<MessageDeliveredNotification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CampaignId>90726d92332c4b9fbaf3cbd8ff0bd221</CampaignId>
  <CampaignName>TestCampaign12a</CampaignName>
  <Events>
    <MessageDeliveredEvent>
      <Email>tbpu4.pulp084@passmail.net</Email>
      <Date>2024-08-07T15:49:01.1414469Z</Date>
      <SubscriberId>tbpu4.pulp084@passmail.net</SubscriberId>
    </MessageDeliveredEvent>
  </Events>
  <Random>MQtCPfZggU6xnCclLJhiYyLL4iED5vBDtB7Tw3kaMzg=</Random>
  <NotificationType>MessageDelivered</NotificationType>
</MessageDeliveredNotification>

{
  "CampaignId": "90726d92332c4b9fbaf3cbd8ff0bd221",
  "CampaignName": "TestCampaign12a",
  "Events": [
    {
      "Email": "tbpu4.pulp084@passmail.net",
      "Date": "2024-08-07T15:49:01.1414469Z",
      "SubscriberId": "tbpu4.pulp084@passmail.net"
    }
  ],
  "Random": "MQtCPfZggU6xnCclLJhiYyLL4iED5vBDtB7Tw3kaMzg=",
  "NotificationType": "MessageDelivered"
}

Message bounced event

The MessageBounced event is a notification that indicates a message sent to a recipient could not be delivered and has "bounced" back. This event is important for managing email communication and understanding the effectiveness of messaging campaigns.

<?xml version="1.0" encoding="utf-16"?>
<MessageBouncedNotification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CampaignId>90726d92332c4b9fbaf3cbd8ff0bd221</CampaignId>
  <CampaignName>TestCampaign12a</CampaignName>
  <Events>
    <MessageBouncedEvent>
      <Email>tbpu5.displease379@passfwd.com</Email>
      <Date>2024-08-07T15:50:02.6914144Z</Date>
      <SubscriberId>tbpu5.displease379@passfwd.com</SubscriberId>
      <Type>S</Type>
      <SmtpResponse>PP User Unknown</SmtpResponse>
      <SmtpCode>550</SmtpCode>
    </MessageBouncedEvent>
  </Events>
  <Random>MQtCPfZggU6xnCclLJhiYyLL4iED5vBDtB7Tw3kaMzg=</Random>
  <NotificationType>MessageBounced</NotificationType>
</MessageBouncedNotification>

{
  "CampaignId": "90726d92332c4b9fbaf3cbd8ff0bd221",
  "CampaignName": "TestCampaign12a",
  "Events": [
    {
      "Email": "tbpu5.displease379@passfwd.com",
      "Date": "2024-08-07T15:50:02.6914144Z",
      "SubscriberId": "tbpu5.displease379@passfwd.com",
      "Type": "S",
      "SmtpResponse": "PP User Unknown",
      "SmtpCode": "550"
    }
  ],
  "Random": "MQtCPfZggU6xnCclLJhiYyLL4iED5vBDtB7Tw3kaMzg=",
  "NotificationType": "MessageBounced"
}

Campaign sent event

The CampaignSent event helps to inform systems when a specific marketing campaign, such as an email blast or direct mail, has been sent out. This event is essential for measuring the effectiveness of trade efforts, ensuring that the intended audience receives the communication, and facilitating further analysis of campaign performance.

<?xml version="1.0" encoding="utf-16"?>
<CampaignSentNotification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CampaignId>90726d92332c4b9fbaf3cbd8ff0bd221</CampaignId>
  <CampaignName>TestCampaign12a</CampaignName>
  <Date>2024-08-07T15:48:37.3343743Z</Date>
  <Random>ZN/WBJPJxkm1FiIFjAVcNfU6gC0q7nVEged1aQCWpFA=</Random>
  <NotificationType>CampaignSent</NotificationType>
  <RecipientCount>2</RecipientCount>
</CampaignSentNotification>

{
  "CampaignId": "90726d92332c4b9fbaf3cbd8ff0bd221",
  "CampaignName": "TestCampaign12a",
  "Date": "2024-08-07T15:48:37.3343743Z",
  "Random": "ZN/WBJPJxkm1FiIFjAVcNfU6gC0q7nVEged1aQCWpFA=",
  "NotificationType": "CampaignSent",
  "RecipientCount": "2"
}

Campaign stats updated event

Campaign stats updated event is a notification that indicates changes have been made to the statistics or metrics of a marketing campaign. This event is important for tracking the performance and effectiveness of campaigns over time.

<?xml version="1.0" encoding="utf-16"?>
<CampaignStatsNotification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CampaignId>90726d92332c4b9fbaf3cbd8ff0bd221</CampaignId>
  <CampaignName>TestCampaign12a</CampaignName>
  <Date>2024-08-07T15:49:05.5711434Z</Date>
  <Random>xadWdLG1p0ObXz2ob0f2+txzYsGtfAdAo1zd87dX/R8=</Random>
  <NotificationType>CampaignStatsUpdated</NotificationType>
</CampaignStatsNotification>

{
  "CampaignId": "90726d92332c4b9fbaf3cbd8ff0bd221",
  "CampaignName": "TestCampaign12a",
  "Date": "2024-08-07T15:49:05.5711434Z",
  "Random": "xadWdLG1p0ObXz2ob0f2+txzYsGtfAdAo1zd87dX/R8=",
  "NotificationType": "CampaignStatsUpdated"
}